package models

// ParamSignUp 注册请求参数
type ParamSignUp struct {
	Phone      string `json:"phone" binding:"required"`                        // json:raw(POST)方式请求对应参数名
	Password   string `json:"password" binding:"required"`                     // binding:"require"表示必传(context.ShouldBind()校验空值会返回错误)
	RePassword string `json:"re_password" binding:"required,eqfield=Password"` // eqfield表示值必须与某个值相等
}

// ParamLogin 登录请求参数
type ParamLogin struct {
	Phone    string `json:"phone" binding:"required"`
	Password string `json:"password" binding:"required"`
}

type ParamVoteData struct {
	PostID    string `json:"post_id" binding:"required"`
	Direction int8   `json:"direction,string" binding:"required"`
}

type ParamPostList struct {
	Page  int64  `json:"page" form:"page"`
	Limit int64  `json:"limit" form:"limit"`
	Order string `json:"time" form:"time"'`
}

type ParamCommunityPostList struct {
	Page        int64  `json:"page" form:"page"`
	Limit       int64  `json:"limit" form:"limit"`
	Order       string `json:"time" form:"time"'`
	CommunityID int64  `json:"community_id" form:"community_id"`
}
